const exportMethods = {
  methods: {
    // 导出txt文件
    // data：自定义的数据内容，可以是服务端返回
    // name：导出文件的名称
    exportRaw(data, name) {
      let urlObject = window.URL || window.webkitURL || window
      let export_blob = new Blob([data])
      let save_link = document.createElementNS("http://www.w3.org/1999/xhtml", "a")
      save_link.href = urlObject.createObjectURL(export_blob);
      save_link.download = name
      save_link.click()
    }
  }
}

export default exportMethods